# -*- coding: UTF-8 -*-
from abaqus import getInputs
from abaqus import *
from abaqusConstants import *
import regionToolset

def computeSEA(UFname,mass):
    xy1 = session.xyDataObjects[UFname]
    xy2 = integrate(xy1)/mass
    xy2.setValues(sourceDescription= 'integrate ( ' + UFname + ') /' + str(mass))
    tmpName = xy2.name
    session.xyDataObjects.changeKey(tmpName, UFname + '-SEA')


# UFname, mass = getInputs(fields=(('UFname',''),('Mass','')), label='compute SEA:',
#         dialogTitle="Input Model's Mass", )

# mass = float(mass)
# computeSEA(UFname, mass)
